#!/usr/bin/env python
#
# Copyright 2007 Doug Hellmann.
#
"""
"""

__version__ = "$Id: urls.py 154 2009-10-31 20:21:11Z doug.hellmann $"

# Import system modules
from django.conf.urls.defaults import *
from django.contrib import databrowse

# Import local modules
import settings
import docket.models

# Module

databrowse.site.register(docket.models.Case)
databrowse.site.register(docket.models.Participant)

urlpatterns = patterns('',
    # Example:
    # (r'^athensdocket/', include('athensdocket.foo.urls')),

    (r'^$', 'views.main'),

    (r'^docket/', include('docket.urls')),

    (r'^browse/(.*)', databrowse.site.root),

    # Static content (CSS, images, etc.)
    (r'^static/(.*)$', 'django.views.static.serve',
     { 'document_root':settings.ROOT + '/static'}),
     (r'^case_images/(.*)$', 'django.views.static.serve',
      { 'document_root':settings.ROOT + '/media/case_images'}),

     # ADMIN
     (r'^admin/docket/case/uploadvtr/', 'docket.admin.upload_vtr'),
     (r'^admin/docket/mediafile/add/$', 'docket.admin.add_mediafile'),
     (r'^admin/docket/mediafile/(?P<id>\d+)/$', 'docket.admin.change_mediafile'),
     (r'^admin/', include('django.contrib.admin.urls')),
)
